package day06;

import java.util.Arrays;

public class TestArray {
    //排序
    public static int[] so(int[] arr) {
       Arrays.sort(arr);


        return arr;
    }
    //调用testArray中数组并输出
    public static void out(int[] arr) {
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i]+"\t");
        }
    }

    //无参有返回值
    public static int[] testArray() {
        int[] arr = new int[10];
        for (int i = 0; i < arr.length; i++) {
            arr[i] = (int) (Math.random() * 100);

        }
        return arr;
    }
    public static void main(String[] args) {

        out(testArray());
        System.out.println(" ");
        int[] ddd={85,52,6,2,4,45,62,99,66,88};
        so(ddd);
        out(ddd);
        System.out.println(" ");
        so(testArray());



    }
}
